# -*- coding: utf-8 -*-
# @author: wch
# @file: index_numpy.py
# @time: 2023/2/6 17:36

import numpy as np
import cv2

# numpy 检索与赋值 [y,x]  [y,x,channel]

img = np.zeros((4, 6,3), np.uint8)
print(img)

count = 0

while count < 4:
    img[count, 5] = 255
    count += 1
print(img)


cv2.namedWindow("img", cv2.WINDOW_NORMAL)
cv2.imshow("img", img)
key = cv2.waitKey(0)
if key & 0xFF == ord("q"):
    cv2.destroyAllWindows()
